package com.example.springdemo8.controller;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.logging.log4j2.Log4J2LoggingSystem;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/logger")
public class LoggerController {
    @RequestMapping("/print")
    public String print() {
        log.trace("这是TRACE级别的日志");
        log.debug("这是DEBUG级别的日志");
        log.info("这是INFO级别的日志");
        log.warn("这是WARN级别的日志");
        log.error("这是ERROR级别的日志");
        return "success";
    }
}
